<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>filter</title>
</head>
<body>
    <script>
        let arr1=[12,35,64,57,67,84,90];
        /*let arr2=arr1.filter(function(item){
            if(item%2==0)
                return true;
            else
                return false;
        })*/
        /*let arr2=arr1.filter(function(item){
            return item%2==0;
        })*/
        let arr2=arr1.filter(item=>item%2==0);
        console.log(arr1);
        console.log(arr2);
    </script>
</body>
</html>